//
// Created by 李云飞 on 2023/10/29.
//

#ifndef CPP_LEARN2_LEARN_H
#define CPP_LEARN2_LEARN_H
#include <iostream>

namespace learn {
    int Print(std::string str = "hello world");

    class debug7_Foo {};

    class ImitateFunc
    {
    public:
        int operator()(int i, int j) {
            std::cout << "仿函数:" << i-j << std::endl;
            return j - j;
        }
    };

    class Minus
    {
    public:
        template<class T>
        T operator()(T i, T j) {
            std::cout << "模版类型-仿函数:" << i-j << std::endl;
            return j - j;
        }
    };

    template <class T>
    T tempFunc(T i, T j){
        T k = i - j;
        std::cout << "包装-模版函数 : " << k << std::endl;
        return k;
    }
}


#endif //CPP_LEARN2_LEARN_H
